$(document).ready(function () {

	// Cart menu
    $('div.show-prod').click(function () {
		$('ul.the_menu').slideToggle('medium');
    });

    // Close button
	$(".close").click(
		function () {
			$(this).parent().fadeTo(400, 0, function () {
				$(this).slideUp(400);
			});
			return false;
		}
	);
	
	// BestSellers
	$(document).ready(function(){
		$('#slider-best').bxSlider({
			alignment: 'horizontal',
			controls: true,
			speed: 500,
			pager: false,
			pager_short: false,
			pager_short_separator: ' / ',
			margin: 0,
			next_text: 'еще',
			next_image: '',
			prev_text: 'назад',
			prev_image: '',
			auto: true,
			pause: 5000,
			auto_direction: 'next',
			auto_hover: true,
			auto_controls: false,
			ticker: false,
			ticker_controls: false,
			ticker_direction: 'next',
			ticker_hover: true,
			stop_text: 'stop',
			start_text: 'start',
			wrapper_class: 'slider-best-wrap'
		});
	});
	
	// TabMenu
	$('ul.tabs').delegate('li:not(.current)', 'click', function() {
		$(this).addClass('current').siblings().removeClass('current')
			.parents('div.section').find('div.box').hide().eq($(this).index()).fadeIn(150);
	})

});